Collaborative cursors in a hosted word processor

ABSTRACT

A computer-implemented collaborative editing method includes receiving input from a user of a browser-based document editing application on a document displayed by the application; identifying a current location in the document for a cursor of a first user executing the application; receiving from a central server system data that reflects changes made to the document by one or more users other than the first user and current positions in the document of cursors for the one or more other user; updating a document model stored on a computing device that is executing the browser-based application and rendering at least a portion of the model to the browser; and rendering the current positions of the cursors for the one or more other users to the browser.

CROSS-REFERENCE TO RELATED APPLICATIONS

This application is a continuation of U.S. Ser. No. 13/085,292 filed onApr. 12, 2011, which claims priority to U.S. Provisional ApplicationSer. No. 61/323,259, filed on Apr. 12, 2010, entitled “CollaborativeCursors in a Hosted Word Processor.” The disclosures of thoseapplications are incorporated herein by reference.

TECHNICAL FIELD

This document relates to systems and techniques for managing anddisplaying locations of cursors for users who are collaborativelyediting an electronic document on a hosted server system.

BACKGROUND

Cloud-based, or hosted, computing generally involves executingapplications via a web browser, and obtaining information for theapplications from a remote server system or service. Cloud computingprovides real advantages over traditional desktop software, such as theability to access documents from various different computers andlocations. Office productivity applications are one type of applicationcurrently be delivered by the cloud. For example, users can employ theirweb browsers to edit word processing and spreadsheet documents that arestored on hosted server systems, may access enterprise resource planning(ERP) applications, may edit photos, and may perform most otheractivities that they could previously perform with desktop productivitysoftware.

In a hosted system, users may also be permitted to access the samedocument simultaneously. For example, the server system may maintain amaster document and may communicate changes to the document to variousclient computing devices that are accessing the document over theinternet. Such collaborative editing may permit for an improvedexperience over systems in which each user makes a batch of edits to, adocument, and then forwards it on to another user, where there is noready feedback loop to correct edits made by one user when another userknows that the edits are not advisable.

SUMMARY

This document describes systems and techniques that may be used todisplay information to users of a hosted word processing system who arein the document at the same time and are editing the documentsimultaneously (where “simultaneous” indicates the ability to haveoverlapping editing in a common session, and does not require literalsimultaneity). As described here, each user's client device mayfrequently report to a server system changes, or mutations, that theparticular user has recently made to their version of the document. Suchreports, which may occur on the order of multiple reports per secondwhen the user is making mutations (e.g., is typing), may be accompaniedby data that tells the server system where the user's cursor is locatedin the document (e.g., between which characters in a character stringthat represents the content of the document). The server system mayresolve the mutations with other mutations it has received from theother users (e.g., if they interfere with each other) and may sendupdated coordinated mutation information out to all of the clientdevices that did not submit the corresponding mutations, and may sendwith such data the data that indicates the positions of the other user'scursors.

Such features may, in certain implementations, provide one or moreadvantages. For example, a browser-based document may be displayed to,and edited by, multiple users at a time in a collaborative editingsession. Each of the users may be visually anchored in being able to seea cursor that marks the editing location for each of the other users. Asa result, the particular user may be induced to avoid editing in thesame area as the other users, so as to avoid collisions in enterededits.

In one implementation, a computer-implemented collaborative editingmethod is disclosed. The method comprises receiving input from a user ofa browser-based document editing application on a document displayed bythe application; identifying a current location in the document for acursor of a first user executing the application; receiving from acentral server system data that reflects changes made to the document byone or more users other than the first user and current positions in thedocument of cursors for the one or more other user; updating a documentmodel stored on a computing device that is executing the browser-basedapplication and rendering at least a portion of the model to thebrowser; and rendering the current positions of the cursors for the oneor more other users to the browser. The method can also comprisereceiving updated information regarding current positions of the cursorsfor the one or more other users in the document, and rendering thecurrent positions of the cursors for the one or more other users.Moreover, the method can include transmitting to the central serversystem data that describes changes to the document made by the firstuser, and identifying a current location in the document for a cursor ofthe first user.

In some aspects, the method comprises transmitting the data describingchanges in the document and identifying a current location for a cursorof the first user more than once per second during periods of activeediting activity by the first user. The method can also comprisedetecting when the first user is actively editing the document, startinga timer when the first user begins editing the document, andtransmitting accrued data from the user's editing activity when thetimer expires. Moreover, the method can include setting the timer for aperiod less than 500 milliseconds, and can also comprise setting thetimer for a period equal to or less than 250 milliseconds. In addition,the method can also comprise transmitting the data describing changes inthe document and identifying a current location for a cursor of thefirst user more than once per second during periods of active editingactivity by the first user.

In another implementation, a computer-implemented collaborative editingsystem is disclosed, and comprises an interface for receivingcommunications from a plurality of client devices editing electronicdocuments using web browsers, including information indicating locationsof a cursor in a document in which a particular user is active; anactive model manager to identify users other than the particular userwho are active in the electronic document; and collaboration logic, toprovide the users other than the particular user with information thatreflects changes made to a model for the, electronic document andlocations in the document of a cursor for the particular user.

The details of one or more embodiments are set forth in the accompanyingdrawings and the description below. Other features and advantages willbe apparent from the description and drawings, and from the claims.

DESCRIPTION OF DRAWINGS

FIG. 1 is a schematic diagram of a system for coordinating cursorlocations in a collaborative document editing situation.

FIGS. 2A and 2B are block diagrams showing components of amodel-view-controller implementation of a spreadsheet application.

FIG. 2C is a block diagram of a system for permitting collaborativeediting of a documented by multiple users through a hosted serversystem.

FIG. 3 is a flow chart of an example process for coordinatingsimultaneous changes to an electronic document.

FIG. 4 is a swim lane diagram of an example process for coordinatingsimultaneous changes to an electronic document

FIG. 5A shows an example screenshot of a word processor that isimplementing a collaborative editing session.

FIG. 5B shows a screenshot of a spreadsheet document being editedcollaboratively by multiple users.

FIG. 6 shows an example of a computer device and a mobile computerdevice that can be used to implement the techniques described here.

Like reference symbols in the various drawings indicate like elements.

DETAILED DESCRIPTION

This document describes systems and techniques for coordinatingsimultaneous editing of an electronic document by multiple differentusers who are separated from each other, and from a server system thatis hosting the interaction, by the internet. Thus, the techniquesdiscussed here can provide a good user experience while editing a richdocument (i.e., a document that can include formatting, images, andother content that goes beyond simple text) in a cloud, or hosted,computing paradigm. As discussed herein, changes that various users maketo a document may be represented as mutations that are communicated to acentral server system that serves as a referee when the mutationsinterfere with time-wise overlapping changes by other users, andforwards the mutations (perhaps after processing them into another form)to the users who are not the source of the particular mutation or groupof mutations in interest. This broadcasting of mutations may occur veryfrequently when a user is making changes to a document, such as on theorder of once every few seconds, once every second, or multiple timesper second. Also, the mutation information may be, accompanied byinformation from the first user that indicates the current location ofthat user's cursor in the document, and information that identifies theuser. As a result, when the other users' computing devices receive suchinformation, they may generate a cursor for the first user (though in acolor or shape that differs from that of their own cursor), and may alsodisplay a tag or flag that shows the first users handle or name. Tominimize visual interference, such a flag may be displayed only when theremote user who corresponds to the cursor is actively editing (e.g., hastyped in the last few seconds) or when the local user hovers a pointerover the other user's cursor.

FIG. 1 is a schematic diagram of a system 100 for coordinating cursorlocations in a collaborative document editing situation. In general, thesystem shown here is a hosted word processing system that multiple userscan access at the same time in order to collaboratively edit a commondocument with each other. Shown schematically here are corresponding webpages for three different users who are working on a newsletter calledthe “Weekly Collaborator.” Page 102 is being edited by a user namedBarley; page 104, which may be generated by a client computing devicethat is remote from page 102, and accessed through a network 110 such asthe internet, is being operated on by a user named Betty; and page 106is being operated on by a user named JohnB. Each of the pages, or moreparticularly each of the web browsers that are generating the pages, maycommunicate through the network 110 with a hosted server system 108. Thesystem 108 may be operated by a company that provides a variety ofhosted services, such as search results, mapping results, paymenttransactions for shopping online, translation tools, and other similarservices: in the cloud.

Page 102 is shown as having a toolbar 112 near its top edge which maydisplay browser buttons and a search box for entering search queries ina familiar manner. Below the toolbar 112, there is displayed chrome 114such as in the form of pull down menus and selectable icons that maycause formatting changes to be made to the document that is being editedin the browser page 102. Additional chrome such as scrollbar 118 may beprovided where the document is larger than the viewport that will fit onthe page 102. A handle on the scrollbar 118 may be selected by a user tobring other portions of the document into view at one time. As describedbelow, the system may follow a model-view-controller arrangement, sothat a model of the document may be stored on a client device, and maybe rendered to a document object model (DOM) that may then be displayedon the page 102. Where the document is much larger than the viewport, itmay be, more efficient to render only a portion of the document at oraround the viewport, and to defer rendering or even downloading from theserver to the client, the remainder of the document model.

In this particular example, the users of page 102, page 104, and page106 are all editing the newsletter furiously to meet an impendingdeadline. As such, each of them has their cursor located at a differentportion of the document from the others, and they are typing text anddeleting text from the document as they edit. Using the techniquesdiscussed here, a controller executing on each of the users' clientcomputing devices may intercept such keystrokes and other inputs, andmay send information about those keystrokes as mutations to the server108. Such information may include, for example, a location indexed tothe content of the model where the edit is currently taking place or hasoccurred, and a location indexed to the model where the particularuser's cursor is currently located. In addition, information foridentifying the particular user may be provided so that, as described inmore detail below, the server 108 may provide information thatidentifies cursor location for users other than the local user.

With respect to the cursor positions, cursor information for all threeusers is shown on page 102. The cursor information for Barley, the localuser, is shown by cursor 122. The cursor 122 and other cursors may begenerated as span elements having a narrow width, in a background colorthat contrasts with the background color of the document that is beingedited. The location for the cursor may be determined by identifying astarting location for the cursor and then, as characters are entered, bygenerating the characters in an off screen div element using theappropriate character size and formatting, and then using standard HTMLelements to determine the height and width of such an off screenelement. Such a user-entered character may then be provided to the DOMand displayed on the page 102, and the position of the cursor 122 may beindexed forward by the width of the off-screen element, so that the,cursor is now to the right of the newly added character, and indicatesto Barley, the local user, that his next keystroke will be at thatlocation. In this manner, the cursor 122 and the, text and otherportions of the document being edited may all be synthetically generatedso as to provide a visual impression that matches the format that theparticular author intended.

A cursor 124A is shown for Betty, as editing the document above thelocation at which Barley is editing the document. A flag 124B isappended to the cursor, so that Barley may immediately recognize thatBetty is performing the particular editing. Thus, for example, Barleymay know that Betty is an expert in the topic around the area where sheis editing and may pay less attention to her edits. In contrast, Barleymay know that the area in which Betty is editing is an area that hecares deeply about, and he may watch Betty's edits very closely andprovide comments to her if she changes the document in a way that hedoes not like. For example, he may paste a marginal note to thedocument, he can edit Betty's edits, or he can type a note into a chatsession that may be executing automatically with the word processingapplication.

JohnB is editing the document at a location far below that of the othertwo users, and off the current viewport on page 102. As a result, thecursor for JohnB is shown only as a small caret 120A that is appended toa flag 120B, and points downward off the page to indicate to Barley thatJohnB is somewhere horizontally in line with the caret 120A, but off thebottom of the page.

Pages 104 and 106 show corresponding icons and flags that may bedisplayed to the other users. In particular, those users may have theirlocations marked merely with an icon like icon 122, and may have thelocations of the other users marked with differently-colored icons andpossibly appended with a flag or other note that identifies the userthat is editing at that location.

The flags shown here may be turned off in certain situations so that'thelocal user may more readily see the page 102. For example, if Bettystops typing for a predetermined period, such as for 5 seconds or more,the flag 124B may disappear, and only icon 124A may be shown. In thisway, an appropriate level of alerting may be provided to a user withoutoverwhelming the visual interface.

Effective collaborative editing may be obtained in such a situation byhaving a controller, like the controller discussed below, intercept userinputs and send them as mutations to the server system 108 frequently.For example, when a long period has passed without input from the user,and the user starts providing input, a timer may be started and allinputs cached when the timer has expired may be sent as a batch ofmutations to the server system 108. The timer may be set for example, aperiod of three seconds, two seconds, one second, or a fraction of asecond, such as by sending uploads to the server system 108, when a useris providing active input, every 200 ms (milliseconds). The serversystem 108 may then revise such mutations that are passed to it if ithas identified that there is a collision between inputs by the users,and may pass the revise mutations back to the other clients. Suchinformation may be accompanied by information that identifies the userwho is making the edits and also the location within the document modelfor the cursor of that user. Such information may be processed by theother client systems, such as by a layout engine generating a spanelement of a narrow width in a background color that contrasts with thebackground for the particular user's document. The cursor as a spanelement may then be placed on an editing surface for page 104 or 106,and may be viewed by the users of those pages.

This process of intercepting user interactions, determining locationsfor cursors at the present time, and passing such information up toserver 108 and back down to the other clients may occur repeatedlythroughout a session of editing a document, until one of the users logsout of the session and their cursor is no longer shown, or until all ofthe users log out of the session, and the most up-to-date model is themodel currently on the server 108. In such a situation, the copies ofthe model at each of the clients may be cached and reused the next timethe users log back into the system, if the server model has not changedfrom that time, or may be discarded (since the central model can bedownloaded at a next session).

FIGS. 2A and 2B are block diagrams showing components of amodel-view-controller (MVC) implementation of a word processingapplication. The word processing application, for example, may beexecuted by a web browser, such as the browser 104 shown in FIG. 1A. Ingeneral, the MVC implementation provides for the download of a modelfrom a remote server to a client, and the rendering of the model into aDOM to form a view of the model that may be managed directly by the webbrowser. The controller may intercept actions, such as clicks on iconsand keystrokes on a keyboard, and may cause such actions to beimplemented, such as by adding typed characters both to the model on theclient and on the remote server (e.g, uploading changes or mutationsback to the server, which may be programmed with rules for integratingthe mutations into a master model, so that the client-side model matchesthe master model as the user works).

Referring to FIG. 2A, a computer application 200A may be configured todisplay a word processing document 202. The application 200A includes,controls, or accesses a model 204A, a view 206A, and a controller 208A.For example, the model 204A can contain a representation of the state ofthe word processing document 202, including such elements as characterdata, formats, styles, paragraphs, sections, breaks, lists, tables,images, formulas, and the like. The view 206A can represent a renderingof the current state of the model 204A. For example, the view canprovide a visual representation that combines the substance of thedocument (e.g., its raw text) with formatting and layout information.The view, when displayed by a browser, provides a form of, if not anexact, WYSIWYG representation of the document that is defied by themodel.

In addition to the rendering of the model, the view 206A can be used forpresenting to the user visual information that is associated with theword processing document 202, such as visible user controls for theapplication (i.e., chrome) and other word processing data. Thecontroller 208A can respond to changes in the model 204A or the view206A, and can update the state of the model 204A and the view 206A. Asshown in FIG. 2A, solid lines between the model 204A, the view 206A, andthe controller 208A represent direct references between components, anddashed lines represent listeners. For example, listening for userinteraction (e.g., provided by user controls) with the presentation ofthe view 206A, the controller 208A can modify the model 204A, and can inturn modify the view 206A either directly or indirectly (by causing theview 206A to obtain new model data and render that new data).

As another example, listening for changes in the model 204A made byanother user in a collaborative environment or changes made through anautomated data update or another such process, the view 206A can requestre-rendering of an updated model or portion of the model. For example,if a user of a client device is only one of multiple users concurrentlyediting a document, characters and other edits by the other users may bepassed to the client device from the server system (and edits by thefirst user may be passed from the client device to the server system),and the client code may add characters to the model in near real-time,and those changes can be passed into the DOM (e.g., via rendering, bythe view 206A)—so that each user can see the edits made by the otherusers very quickly.

Referring to FIG. 2B, the model-view-controller implementation aspresented in FIG. 2A is shown with additional detail. As shown, acomputer application 2006 (corresponding with the application 200A)includes, controls, or accesses a model 204B (corresponding with themodel 204A), a view 206B (corresponding with the view 206A), and acontroller 208B (corresponding with the controller 208A).

The model 204B can include one or more document models 210. Each of thedocument models 210 can represent a separate document in a collection ofword processing documents, for example, and each of the models 210 caninclude elements such as characters, styles, and entities. Other formsof documents such as spreadsheet documents may also be represented.Model data and elements may be provided by a master document model 238that is stored on a remote server system via a connection to a network236 (e.g., the internet).

Generally, document text in the models 210 is associated with a seriesof characters. For example, the characters may represent raw text forthe word processing document 202, and may also include certain reservedcontrol characters such as characters that indicate the occurrence of abreak (e.g., a paragraph break, a page break, or the like). In someimplementations, each of the document models 210 can include aone-dimensional character string that includes document characters in anorder in which they appear in the document.

Styles may be used to store information related to the presentation ofdocument text (e.g., the series of characters). For example, text stylesmay include character formatting attributes such as font, font size,bold, italics, underline, foreground and background colors, alignment,and other such attributes. In some implementations, styles included ineach of the document models 210 can be stored in a sparse map. Forexample, the sparse map can include markers that correspond to changesin styles in the document and pointers to positions in the characterstring. The pointers, for example, can define style runs, betweenmatched markers by specifying locations along the character string atwhich style changes occur. In some implementations, the markers in thematched set may be arranged to be tethered to certain characters in theone-dimensional character string. For example, if text is added betweentwo paired markers, the pointer for one of the markers may shift by aninteger equal to a number or characters associated with the added text.

Entities in each of the models 210 may be used to store informationrelated to objects outside of the document models 210, and may bepointed to by references in the model such as in the one-dimensionalcharacter string. For example, entities may include objects such aslists, tables, images, and the like. In some implementations, thereferences can include object identifiers and pointers to theone-dimensional character string (e.g., from the sparse map) indicatingwhere in the character string the object should appear, or identifiersfrom within the character string that point to the entities and mark thelocations at which the particular entities are to appear in the documentwhen it is rendered and displayed. For example, an image that shouldappear between two paragraphs may be associated with a special characterappearing in the character string after a paragraph marker for oneparagraph, and before the first character of the next paragraph.

The view 206B can generate one or more view items 220 that may enablethe user to interact with the application 200B, such as menu bars, toolbars, context menus, chat panes, dialogs, other chrome, and the like.The view 206B can also include a document menu 222 that presentsinformation and control options related to one or more of the documentmodels 210, and one or more of a set of per views 224. For example, oneof the per views 224 may be associated with a corresponding one of thesheet models 210. Each of the per views 224 may include components orcontrols such as selectors (e.g., cursors, selection indicators, and thelike) navigation tools (e.g., scrollbars, document maps, outlines, andthe like).

The controller 208B can include one or more controllers 230 that maylisten for and handle user interactions with one or more of the viewitems 220. In some implementations, each of the controllers 230 may beassociated with a corresponding one of the view items 220. For example,menu bar controllers may listen for and handle user interactions withmenu bar view items (e.g., relating to various actions that a user wouldtypically take from a row of menu selections), tool bar controllers maylisten for and, handle user interactions with tool bar view items,context menu controllers may listen for and handle user interactionswith context menu view items, and so forth. The determination that aparticular event has occurred may cause a particular controller 230 toexecute predetermined code or otherwise carry out a predeterminedprocess, such as by updating a local model when a key press is receivedand uploading information about the key press to a central serversystem.

The controller 208B can also include a document controller 232 that maylisten for and handle user interactions with the document menu 222. Inaddition, the controller 208B can include a set of per view controllers234, where each of the controllers 234 is configured to listen for andhandle user interactions with a corresponding view in the set of perviews 224. Each of the per view controllers 234 may include variouscontroller types, such as key controllers for intercepting andinterpreting keyboard input, mouse controllers for intercepting andinterpreting mouse input, and model change controllers for interceptingand interpreting model change events.

Generally, the controllers included in the controller 208B can transformuser-generated events into model and view mutations. For example, basedon a user action, a relevant controller (e.g., a controller configuredfor handling the action) may receive one or more events associated withthe action and make transient changes to the view 206B before the useraction is committed. Then, based on the event properties, the relevantcontroller can construct a command to mutate the model 204B, execute it,and send the updated model or just data for the particular mutations tothe remote server system that hosts the document model 238 via thenetwork 236.

The controllers may also use timers or other mechanisms to aggregateinputs or mutations, so as to lower the number of updates that need tobe made to the local or server-based models. For example, thecontrollers may implement changes to the local and/or server-based modelin batches that occur within predefined time windows, such as by waiting200 ms after an initial keystroke is, sensed before sending to thecentral server system data about all keystrokes received in the timewindow.

Many possible user interactions with the application 200B are possible,including interactions that are included in single-user sessions and, inmultiple-user sessions. For purposes of illustration, a series ofexample user interactions with the application 200B are described here.For example, to enter text into the word processing document 202, theuser may proceed by using a computer mouse to select a desired documentlocation 212 for text insertion by clicking on the document 202. A mousecontroller that is included in the per view controllers 234 (e.g., a perview controller associated with the active document 202) can listen foran event that is associated with the mouse positioning input and themouse click input, and upon intercepting it, can modify the view 206B(e.g., a per view associated with the active document) to provide theuser with a visual indicator for the selection (e.g., a cursor). Forexample, the selected location 212 may be associated with a visiblecursor (where the cursor is a graphical HTML element such as an image,and is displayed at an appropriate location on a canvas where thedocument is also being displayed so as to create a syntheticpresentation that makes the graphical element look like a true cursor),may be highlighted, or may receive another such modification.Additionally, the selected location 212 may also be associated with alocation in the model 204B. For example, a position in a one-dimensionalcharacter string included in the document models 210 can be determined,based on the selected location 212.

Using a keyboard, the user may enter desired text at the documentlocation 212. A keyboard controller that is included in the per viewcontrollers 234 can listen for events associated with the keyboardinput, and upon intercepting them, can modify the view 206B to providethe user with a visual indicator for the input. For example, as the usertypes text at the location 212, the document 202 may be visually updatedto present the text to the user. Additionally, the keyboard controllercan modify the model 204B to include entered text by copying the userinput to the model. For example, a one-dimensional character stringincluded in the document models 210 can be updated to include theentered characters. Additionally, the document model 238 may be updatedto include the entered text, thus coordinating the model 204B with thedocument model 238. For example, changes to the model 204B may betransmitted to the document model 238 via a connection to the network236. In some implementations, changes may be sent periodically (e.g.,once every 100 milliseconds, once every 200 milliseconds, once every 600milliseconds, once every second, once every 2 seconds, or anotherappropriate time interval). In some implementations, changes may be sentbased on user activity (e.g., entering a paragraph break, applying aformatting change, navigating to another document section, clicking asave button, or some other action).

As another example, the user may insert an entity (e.g., a list, atable, a hyperlink, an image, or another such object) into the document202. For example, the, user may proceed by using a computer mouse toselect a desired document location (e.g., the location 212) for entityinsertion by clicking on the document 202. Similar to interactionsassociated with text entry, for example, a mouse controller included inthe per view controllers 234 can listen for an event associated with themouse positioning input and the mouse click input, and upon interceptingit, can modify view 206B to provide the user with a visual indicator forthe selected location. Next, for example, the user may specify theentity for insertion by interacting with one of the view items 220 orwith the document menu 222. For example, the user may make a selectionon a menu bar to indicate an intent to insert an image. A dialogassociated with image selection may be presented to the user, enablingthe user to select the desired image.

Model-view-controller interactions for adding the entity within theapplication 200B may operate in a similar manner as when a user isentering text. For example, as the user inserts the image at thelocation 212, the document 202, as it is displayed on an editingsurface, may be visually updated to present the image to the user.Additionally, the model 204B may be modified to include a reference tothe inserted image by writing the reference to the model. For example,one of the document models 210 (e.g., the model associated with theactive document) can be updated to include a reference to the insertedimage. A one-dimensional character string may be updated to include aspecial character indicating the position of the image, and thereference to the image may be stored.

When the document 202 is rendered from the model associated with theactive document, for example, the image content may be integrated intothe document 202 that is displayed to the user. In some implementations,the one-dimensional character string may include multiple instances ofan identifier for a single entity. For example, the image may bepositioned at multiple locations in the document 202, specified bymultiple positions for the identifier in the one-dimensional characterstring. Thus, a single external entity may be shared within a document,or may be shared among multiple documents—both by common references tothe external entity. The document model 238 may be updated to includethe inserted image(s), thus coordinating the model 204B with thedocument model 238. For example, changes to the model 204B may betransmitted to the document model 238 via a connection to the network236.

Additionally, for example, the user may modify the formatting of textand entities presented in the document 202. By interacting with one ofthe view items 220 or with the document menu 222, the user can indicatea desired formatting change (e.g., a change such as changing a font of aselected text block to bold, changing a group of words to be organizedas a list, changing a paragraph justification to be right-aligned,changing a document line spacing to be double-spaced, and the like). Oneof the controllers 230 or the document controller 232 can listen foruser interaction with the view 206B, and upon detecting the interaction,can modify the model 204B to include the formatting change. For example,one of the document models 210 (e.g., the model associated with theactive document) can be updated to include an element in a sparse map ofstyles defining the formatting change, and defining the locations alongthe one-dimensional character string at which the changes in style areto occur. A model change controller included in the per view controllers234 can listen for events associated with the model 204B and can send arequest to the view 206B to update accordingly (e.g., by rendering adisplay of formatted text). In some implementations, the model changecontroller may also handle model change events that result fromcollaborative model changes.

In some implementations, a document model that is one of the documentmodels 210 may include a subset of the document data from the documentmodel 238. For example, if the document model 238 is substantiallylarge, a subset of the data (e.g., a subset associated with a portion ofthe document that is currently viewable by the user, plus perhaps abuffer area around the currently viewable area, or viewport, so thatsmall scrolling distances may be handled by normal browser interactionswithout a need to render additional content form the model) may beprovided to each client that is currently displaying the word processingdocument 202. As another example, the full document model 238 may beprovided to each client.

The user may elect to view a different portion of the word processingdocument 202 than the user is currently viewing in the web browser. Forexample, by interacting with a scrollbar 214 that is associated with thedocument 202, the user may indicate an intent to view document databeyond the current viewport, or displayed area. One of the per viewcontrollers 234 (e.g., the per view controller associated with theactive document) can listen for user interaction with the view 206B orother appropriate component (e.g., the visual portion of the scrollbar214), and upon detecting the interaction (e.g., via a computer mouse),can request for the view 206B to redraw itself.

If the user specifies a small amount of scrolling, the view 206A maycause itself to be displayed by the browser. For example, a buffer areaof document data may be maintained in the model 204B (already renderedinto a DOM) around the data that is displayed in the visible area of thedocument 202. If the amount of scrolling specified by the user isdetermined, by the view 206B to be within the bounds of the buffer areaof data, the document display may be updated using such pre-rendereddata. If the user specifies a larger amount of scrolling, such that thescrolling specified by the user is determined by the view 206B to beoutside of the bounds of the pre-rendered buffer data, for example,additional document data from the document model 238 may be downloadedvia the network 236. Thus, the model 204B may be updated withinformation that is related to additional document sections, and thedocument may be rendered using the downloaded data.

FIG. 2C is a block diagram of a system 240 for permitting collaborativeediting of a document by multiple users through a hosted server system.In general, the system 240 includes a hosted document system 242executed by one or more computer servers (e.g. a server farm). Thehosted document system 242 can provide document hosting services to anynumber of client users via connections to a network 244 (e.g., theinternet). Using the document system 242, client users may create newdocuments, modify existing documents, share documents, andcollaboratively work on documents with other users.

For purposes of illustration, document hosting services may be providedto browser applications 246, 248, and 250. Each of the applications maybe executed by a web browser (e.g., by the browser 104, as shown in FIG.1), and may include model, view, and controller components (e.g.,similar to the application 200, shown in FIGS. 2A and 2B). Theapplications 246, 248, and 250 may be configured to execute computercode (e.g., JavaScript and other code running in a web browser) todisplay a word processing interface and to perform word processingfunctions associated with one or more documents served by the hosteddocument system 242.

As shown in the present illustration, Chris can interact with a webbrowser 252, Tina can interact with a web browser 254, and Spike caninteract with a web browser 256. Each of the browsers 252, 254, and 256may access any appropriate number of browser applications (e.g.,embedded applications, widgets, web services, and the like). Forexample, browser 252 can access application 246, browser 254 can accessapplication 248, and browser 256 can access application 250.

By interacting with controls presented by the web browsers, for example,users of the system 240 (e.g., Chris, Spike, and Tina), can Work withone or more documents that are managed and provided by the hosteddocument system 242. For example, the users may access existingdocuments provided by the system 242 or may create new documents. Eachof the browser applications 246, 248, and 250 can communicate with aninterface 260 of the document system 242 via the network 244. Forexample, communication between the browser applications 246, 248, and250 and the interface 260 may include HTTP (HyperText Transfer Protocol)requests, SOAP (Simple Object Access Protocol) messages, or some otherappropriate protocol. In some implementations, client browsers maymaintain browser channel connections to the interface 260 forcommunicating session data between clients and the document system 242.

The hosted document system 242 can include sub-components for storingand managing information related to system users, documents, and browserapplications. The various sub-components may be executed by the samecomputer server, or may be distributed among multiple computer servers.The sub-components may communicate with each other directly (e.g., viamessages, transferred files, shared data, remote procedure calls, orsome other protocol) or indirectly (e.g, by communicating with anintermediary application). Generally, sub-components included in thedocument system 242 can communicate with client applications (e.g., thebrowser applications 246, 248, and 250) via the interface 260.

The system 242 can also include one or more data stores for storing userinformation 270. For example, the user information 270 can includeinformation associated with system users (e.g., Chris, Tina, and Spike).Such information may include general user information and logininformation (e.g., user names, passwords, e-mail addresses, and thelike), information related to one or more devices employed by the usersto access the system (e.g., IP addresses, browser versions, connectionspeeds, and the like), and system usage information (e.g., access times,amount of data accessed, and the like), to name a few possibilities.

In some implementations, the system 242 can include one or more datastores for storing documents 272 in the form, e.g., of document modelslike those discussed above and below. For example, the documents 272 caninclude word processing documents created, maintained, and accessed bysystem users. As another example, the documents 272 may be generated byan automated process, such as a news feed or another reporting processthat is based on gathered data. Information associated with thedocuments 272 can include document data models, document text, documentformatting information, entities (e.g., tables, images, videos, soundclips, or other such objects), and the like.

The system 242 can also include one or more data stores for storingaccess information 274. For example, the access information 274 caninclude information that can be used for controlling access of systemusers (e.g., users included in the user information 270) to systemdocuments (e.g., documents included in the documents 272). Generally,system users may set access privileges for documents that they create ormanage. For example, Chris may create a personal letter'document andspecify the document as being private. Thus, other users of the system(e.g., Tina and Spike) may be unable to locate or access the document,which may have access control limitations applied to it in variousfamiliar manners. As another example, Tina may upload a scheduledocument and specify the document as being shared and as being viewableby Chris. Thus, Spike may be, unable to locate or access the document,but Chris may be able to access the document in view-only mode. In someimplementations, Tina, as the document creator, may retain full accessto the document, having privileges such as the ability to add, edit, anddelete content, having the ability to change privileges, and having theability to remove the document from the system 242. As another example,Spike may create a document related to a group project and specify Chrisand Tina (and himself) as having full access privileges. In someimplementations, user groups may be included in the access information274. For example, a user may create a group and may add one or moreusers to the group. Rather than select individual users when assigningdocument permissions, in some instances, users may select a groupincluding the users. The access information 274 may also include suchinformation as the user ids of document users, document access times,and the like.

In some implementations, the system 242 can include one or more datastores for storing HTML/JavaScript 276. For example, the HTML/JavaScript276 can include application code for executing the browser applications246, 248, and 250. The application code may be provided to any of thebrowsers 252, 254, and 256, for example, when browser users access a website associated with the hosted document system 242. Upon receiving arequest for any of the documents 272, for example, the system 242 mayprovide the HTML/JavaScript 276 in addition to one or more of thedocuments 272. Using the HTML/JavaScript 276, the browser applications246, 248, and 250 may render the document data and may provide aninterface that enables browser users to interact with the documents. Insome implementations, technologies other than HTML and JavaScript may beused for providing application code. For example, for web browsersincluding an appropriate plugin, another type of compiled or interpretedcode may be provided.

Many possible user interactions with the system 240 are possible,including interactions in single user sessions and in multiple usersessions. For example, in a collaborative editing session, multipleusers may simultaneously interact with a document. Although theapplications used for editing the document may each behaveindependently, the applications may follow the same editing rules forupdating and rendering the document model. Thus, multiple users may havesimilar experiences with the document, and may work together to producea similar document model.

In an example session, to initiate collaborative word processingdocument editing, Chris accesses the hosted document system 242 bydirecting the web browser 252 to a web site (e.g., a domain) that isassociated with the system 242. Receiving login information from thebrowser 252, the system 242 can verify Chris's information against theuser information 270. Upon verification, the system 242 can provideHTML/JavaScript 276 to the browser 252 for executing an online wordprocessor (though certain of the code may be passed before verificationoccurs). The browser can include a portion of the HTML/JavaScript 276 asthe browser application 246, render chrome associated with theapplication, and display the application to Chris.

Chris may interact with the browser application 246 via a set ofcontrols displayed in an application view within the browser 252. Forexample, Chris may indicate an intent to create a new document byclicking a button or selecting a menu option displayed in theapplication view. The application controller can intercept the commandand pass the command to the interface 260 via the network 244. Receivingthe command, the system 242 can add a new document to the documents 272,and add information associated with the new document to the set ofactive models 262. For example, the active models 262 may include modelinformation associated with documents currently being edited by otherusers of the system 242.

A corresponding version of a model in the set of active models 262 maybe present at the browser application 246. For example, Chris may addcontent and make changes to the word processing document provided by theview of the browser application 246, and the corresponding content andchanges can be applied to a model that is accessed by the browserapplication 246 (and associated HTML and JavaScript code running in thebrowser), and may be propagated to the active models 262.

Chris may also share the document with one or more users. For example,using controls associated with the application 246, Chris may selectTina and Spike as users who may share the document, and he may assignboth Tina and Spike full document privileges. For example, Tina andSpike may be included in a presented list of users commonly sharingdocuments with Chris, and Chris may select Tina and Spike from the list.As another example, Chris may provide the e-mail addresses of Tina andSpike. The system 242 can store the sharing, information (e.g., user idsof other users having access to the document, permissions levels for theusers, and the like) in the access information 274. In someimplementations, the system 242 may send messages (e.g., e-mail, textmessages, instant messages, and the like) to users who have receiveddocument privileges. In some implementations, users who have receiveddocument privileges may receive a link (e.g., a hyperlink or URL) to theshared document.

Upon receiving notification of the shared document, Tina and Spike mayaccess the document using their web browsers 254, 256. For example, uponverification, the system 242 can provide HTML/JavaScript 276 to thebrowser 254, 256 for executing an online word processor. The browserscan include a portion of the HTML/JavaScript 276 as the browserapplications 248, 250, can render chrome associated with theapplication, and can display the applications.

Additionally, an active model manager 264 included the hosted documentsystem 242 can identify which documents are currently open by users ofthe system, and users who are active in the document (i.e., Chris), andcan set up a collaborative session. For example, the active modelmanager 264 can determine that the document requested by Tina and bySpike is associated with one or more of the active models 262. Thesystem 242 can then forward the document request to a computer hostingthe document, and the computer can associate Tina and Spike with thecurrent session. Additionally, the browser applications 248, 250 candownload model data associated with the active model(s) 262, and renderand display the downloaded model data. In some implementations, thesystem 242 can create model instances for Tina and for Spike and can addthe instances to the active models 262.

In the present example, users may be able to view their own cursors aswell as the cursors of other users in a collaborative session. Forpurposes of illustration, each user's cursor appears to himself/herselfas a square. For example, Chris may view his own cursor as a square, andthe other users’ cursors as a circle or as a triangle. Correspondingly,Tina and Spike may also view their own cursor as a squares, and theother users' cursors as circles or triangles. In some implementations,the cursors may appear as a different color (which could not be shownhere). For example, cursors may generally appear as underlines orvertical bars, where the cursors are different colors for each user.

In the present example, changes made by each of the users can be sent bythe browser applications 246, 248, and 250 to the hosted document system242, coordinated, and sent back to the other users. In someimplementations, the changes can be sent at time intervals (e.g., onceevery 100 milliseconds, once every 200 milliseconds, once every 600milliseconds, once every second, once every 2 seconds, or anotherappropriate time interval). In some implementations, sending can bebased at least in part on user activity or inactivity. For example,during periods of user inactivity, changes may be sent or received lessfrequently than during periods of user activity. When a user is enteringdata or when a local user hovers over a cursor for another user, apop-up label that identifies the other user may be displayed, so thatthe local user can identify who is making changes—though the label maythen disappear so that it does not continue to block the document.

To coordinate multiple document changes made by multiple users, forexample, the hosted document system 242 can include collaboration logic266. For example, the collaboration logic 266 can be executed by one ormore code modules executed by one or more computer servers associatedwith the system 242. In some implementations, portions of thecollaboration logic can be; executed by the browser applications 246,248, and 250. Generally, the logic 266 can resolve data collisions(e.g., instances where multiple users edit the same document portion orapply conflicting document formats) by applying a consistent set ofrules to all user changes. Although, in some instances, one or moreusers may be prompted to disambiguate a change. For example, if Tinamakes a document change and Spike makes a conflicting document changebefore receiving Tina's change, Spike may be presented with a messagefrom the browser application 250 including possible conflict resolutionscenarios. In some implementations, one user may be identified astrumping other users in collision situations. Chris, as the documentcreator, for example, may be able to apply his changes over changes madeby either Tina or Spike in cases of conflict. For example, if Spikeedits a passage at the same time as Chris deletes it, the passage(including Spike's edits) may be deleted.

Thus, the system shown in FIG. 2C may handle collaborative editing of ahosted document by multiple users at one time. The management of suchediting can involve a low amount of data passing between the varioussub-systems in the system

FIG. 3 is a flow chart of an example process for coordinatingsimultaneous changes to an electronic document. In general, the processinvolves identifying changes in a document and document model made by auser of a client computing device, recording those changes as mutations,identifying a current location of a cursor for the user of the clientdevice, and uploading such information to a server system, which maythen share such information with other client devices, perhaps afterreformatting or otherwise adjusting the information. This informationmay enable each of the client devices to show edits made by the otherdevices and the current cursor position of the other devices in realtime on each of the local machines.

The process begins at box 302, where user inputs are received by aclient device. These inputs may take a variety of forms, such as typingof text into a word processing, spreadsheet, or drawing document, orother appropriate changes. The input may also involve deleting text,inserting figures, and changing the format or style of elements in adocument.

At box 304, the inputs receive from the user are packaged into atransmission to a central server system. Such information that istransmitted to the server system may include information that identifiesthe changes made by a user, and locations at which those changes are tobe made in a document model that is being managed by the central serversystem. The changes may also include a revision number so that thecentral server system may track the order in which changes have arrived,and may use such information to resolve interferences between changesreceived from different users. In addition, the information may includeidentifying information for each user so that the users' identities maybe shared with other users in a collaborative editing mode for adocument.

At box 306, the client device updates its own version of the documentmodel and renders that model or the updated portion of the model to adocument object model (DOM) on the device that is accessible to abrowser that will then display the document. At box 308, the devicereceives model data for the document from the central server system.This received information corresponds to information that other clientdevices provided to the central server system, similar to theinformation that the first local client device provided in box 304.Thus, the various users are making simultaneous edits, and thecommunications through the central server system are overlapping witheach other.

In the time since the client device last communicated with the serversystem, the user of the device may have made edits on the device thataffect or are affected by the edits made by other users on otherdevices. As such, overlapping edits may need to be identified, andtransformations may be performed in a manner that matchestransformations performed on the other clients and on the server system,so as to generate an updated document model at the local client. Theclient may also identify cursor positions of the other users, where suchpositions may be indicated directly in the data that was received formthe server system. That data may be added to the local document, model,and rendered to the local DOM. Such data may also indicate anidentifier, such as a username or handle, to associate with each cursorposition. At box 312, the process resolves the edits and adjusts cursorpositions for each of the other users that had a cursor previouslydisplayed on the document display at the local client. For example,narrow span elements having background colors that contrasts with thebackground of the document may be moved within the DOM from theirpositions indicated in the last communication from the server system, tonew positions indicated by the most recent communication from the serversystem.

At box 314, the changes are added to the model and by extension to theDOM, when the model is rendered to the DOM area, and at box 316, abrowser displays the modified document and the cursors by accessing theDOM. The process shown here may repeat frequently, as noted above, suchas repeating multiple times per second. As a result, cursor positionsfor other users may be frequently updated and may very closely match intime and location to cursor positions currently being seen by the otherusers on their own machines. As a result, multiple users may interactmore smoothly because they can readily see the work that other users areperforming in the document in real time.

FIG. 4 is a swim lane diagram of an example process for coordinatingsimultaneous changes to an electronic document. In general, the processshows an example in which symmetrical actions are taken by two differentclient computing devices that are both accessing a common documentthrough a central server system to perform collaborative editing on thedocument.

The process starts at boxes 402A and 402B, where each of the users atthe two client devices begins editing a shared document nearlysimultaneously. At boxes 404A and 404B, each of the client devices maytransmit those changes to the server system, such as when a timerexpires, or for every keystroke or similar change that is identified onone of the clients. At box 406, the server system identifies thedocument as being edited by the particular user, and in this example,may perform such actions for the two different client devices inparallel, as shown by the stacked boxes in the middle column. Theactions may also be stacked in a queue, and handled in the order inwhich they were received. The server system 408 may also identify otherusers who are currently in the document and active, so that it maydetermine which other users to share the information that it isreceived. At box 410, the server system updates its master copy of thedocument model and transmits change data to the respective clients, ordata associated with the changes from client B will be sent to client A,and changes associated with client B will be sent the client A.

At boxes 412A and 412B, the clients receive the change data from thecentral server system and identify potential collisions created by theedits from the other client when compared to the edits made on the localclient. At boxes 414A and 414B, each of the client devices adjusts itschange data representations to resolve such collisions and then, atboxes 416A and 416B, the client devices update their respective modelsand render them to the respective DOMs on browsers running on theclients. Finally, at boxes 418A and 418B, the clients change the data inthe DOM relating to cursors of other users, and shift therepresentations for those cursors to new positions represented in thedata received from the server system at boxes 412A and 412B.

The process shown here may be a continuous process, in that each clientmay be continually listening for input made to the users and maytransmit the input in batches that may be batches of single inputs suchas keystrokes or in slightly larger batches, where the batch size isgenerally selected to be small enough that inputs may be transmitted toother clients frequently enough to provide a smooth user experience in acollaborative session.

FIG. 5A shows an example screenshot of a word processor that isimplementing a collaborative editing session. In this example, there arethree users looking at a resume of Joseph Smith and typing comments atthe bottom of the resume. The particular screenshot shown here is a pageuser named kroberts, as indicated by the fact that an cursor in themiddle of the three lines near the bottom of the resume is notaccompanied by a flag with a name to it. Presumably, the local user(kroberts here) does not need to see her own name next to her cursor,and also by omitting the flag, the cursor stands out more prominently ascompared to the other cursors that look more like each other. The otherusers, James Pattison and a user named otazi are typing at the same timeas kroberts such that if the figure were animated, one would see thethree vertical cursor bars moving across the page from left-to-rightalmost in unison. Each update to the DOM from which the document isgenerated may occur frequently (e.g., multiple times per second), andmay include one to several characters, depending on a typing speed ofthe particular user.

Also, a chat box is provided to a right side of the page, where theusers may type comments as they move along, where those comments willnot be included on the document itself. For example, as shown here, in acollaborative editing environment, one of the users may request that theother users perform certain actions. As one example, a first user mayrequest that other users review and edit particular paragraphs in thedocument while the first user reviews and edits other paragraphs.

FIG. 5B shows a screenshot of a spreadsheet document being editedcollaboratively by multiple users. In this example, the presence of theparticular user's cursors is indicated by colored outlines or boxes onparticular cells, and here it appears that four different users areconcurrently editing column B. of the spreadsheet.

FIG. 6 shows an example of a generic computer device 600 and a genericmobile computer device 650, which may be used with the techniquesdescribed here. Computing device 600 is intended, to represent variousforms of digital computers, such as laptops, desktops, workstations,personal digital assistants, servers, blade servers, mainframes, andother appropriate computers. Computing device 650 is intended torepresent various forms of mobile devices, such as personal digitalassistants, cellular telephones, smartphones, and other similarcomputing devices. The components shown here, their connections andrelationships, and their functions, are meant to be exemplary only, andare not meant to limit implementations of the inventions describedand/or claimed in this document.

Computing device 600 includes a processor 602, memory 604, a storagedevice 606, a high-speed interface 608 connecting to memory 604 andhigh-speed expansion ports 610, and a low speed interface 612 connectingto low speed bus 614 and storage device 606. Each of the components 602,604, 606, 608, 610, and 612, are interconnected using various busses,and may be mounted on a common motherboard or in other manners asappropriate. The processor 602 can process instructions for executionwithin the computing device 600, including instructions stored in thememory 604 or on the storage device 606 to display graphical informationfor a GUI on an external input/output device, such as display 616coupled to high speed interface 608. In other implementations, multipleprocessors and/or multiple buses may be used, as appropriate, along withmultiple memories and types of memory. Also, multiple computing devices600 may be connected, with each device providing portions of thenecessary operations (e.g., as a server bank, a group of blade servers,or a multi-processor system).

The memory 604 stores information within the computing device 600. Inone implementation, the memory 604 is a volatile memory unit or units.In another implementation, the memory 604 is a non-volatile memory unitor units. The memory 604 may also be another form of computer-readablemedium, such as a magnetic or optical disk.

The storage device 606 is capable of providing mass storage for thecomputing device 600. In one implementation, the storage device 606 maybe or contain a computer-readable medium, such as a floppy disk device,a hard disk device, an optical disk device, or a tape device, a flashmemory or other similar solid state memory device, or an array ofdevices, including devices in a storage area network or otherconfigurations. A computer program product can be tangibly embodied inan information carrier. The computer program product may also containinstructions that, when executed, perform one or more methods, such asthose described above. The information carrier is a computer- ormachine-readable medium, such as the memory 604, the storage device 606,memory on processor 602, or a propagated signal.

The high speed controller 608 manages bandwidth-intensive operations forthe computing device 600, while the low speed controller 612 manageslower bandwidth-intensive operations. Such allocation of functions isexemplary only. In one implementation, the high-speed controller 608 iscoupled to memory 604, display 616 (e.g., through a graphics processoror accelerator), and to high-speed expansion ports 610, which may acceptvarious expansion cards (not shown). In the implementation, low-speedcontroller 612 is coupled to storage device 606 and low-speed expansionport 614. The low-speed expansion port, which may include variouscommunication ports (e.g., USB, Bluetooth, Ethernet, wireless Ethernet)may be coupled to one or more input/output devices, such as a keyboard,a pointing device, a scanner, or a networking device such as a switch orrouter, e.g., through a network adapter.

The computing device 600 may be implemented in a number of differentforms, as shown in the figure. For example, it may be implemented as astandard server 620, or multiple times in a group of such servers. Itmay also be implemented as part of a rack server system 624. Inaddition, it may be implemented in a personal computer such as a laptopcomputer 622. Alternatively, components from computing device 600, maybe combined with, other components in a mobile device (not shown), suchas device 650. Each of such devices may contain one or more of computingdevice 600, 650, and an entire system may be made up of multiplecomputing devices 600, 650 communicating with each other.

Computing device 650 includes a processor 652, memory 664, aninput/output device such as a display 654, a communication interface666, and a transceiver 668, among other components. The device 650 mayalso be provided with a storage device, such as a microdrive or otherdevice, to provide additional storage. Each of the components 650, 652,664, 654, 666, and 668, are interconnected using various buses, andseveral of the components may be mounted on a common motherboard or inother manners as appropriate.

The processor 652 can execute instructions within the computing device650, including instructions stored in the memory 664. The processor maybe implemented as a chipset of chips that include separate and multipleanalog and digital processors. The processor may provide, for example,for coordination of the other components of the device 650, such ascontrol of user interfaces, applications run by device 650, and wirelesscommunication by device 650.

Processor 652 may communicate with a user through control interface 658and display interface 656 coupled to a display 654. The display 654 maybe, for example, a TFT LCD (Thin-Film-Transistor Liquid Crystal Display)or an OLED (Organic Light Emitting Diode) display, or other appropriatedisplay technology. The display interface 656 may comprise appropriatecircuitry for driving the display 654 to present graphical and otherinformation to a user. The control interface 658 may receive commandsfrom a user and convert them for submission to the processor 652. Inaddition, an external interface 662 may be provide in communication withprocessor 652, so as to enable near area communication of device 650with other devices. External interface 662 may provide, for example, forwired communication in some implementations, or for wirelesscommunication in other implementations, and multiple interfaces may alsobe used.

The memory 664 stores information within the computing device 650. Thememory 664 can be implemented as one or more of a computer-readablemedium or media, a volatile memory unit or units, or a non-volatilememory unit or units. Expansion memory 674 may also be provided andconnected to device 650 through expansion interface 672, which mayinclude, for example, a SIMM (Single In Line Memory Module) cardinterface. Such expansion memory 674 may provide extra storage space fordevice 650, or may also store applications or other information fordevice 650. Specifically, expansion memory 674 may include instructionsto carry out or supplement the processes described above, and mayinclude secure information also. Thus, for example, expansion memory 674may be provide as a security module for device 650, and may beprogrammed with instructions that permit secure use of device 650. Inaddition, secure applications may be provided via the SIMM cards, alongwith additional information, such as placing identifying information onthe SIMM card in a non-hackable manner.

The memory may include, for example, flash memory and/or NVRAM memory,as discussed below. In one implementation, a computer program product istangibly embodied in an information carrier. The computer programproduct contains instructions that, when executed, perform one or moremethods, such as those described above. The information carrier is acomputer- or machine-readable medium, such as the memory 664, expansionmemory 674, memory on processor 652, or a propagated signal that may bereceived, for example, over transceiver 668 or external interface 662.

Device 650 may communicate wirelessly through communication interface666, which may include digital signal processing circuitry wherenecessary. Communication interface 666 may provide for communicationsunder various modes or protocols, such as GSM voice calls, SMS, EMS, orMMS messaging, CDMA, TDMA, PDC, WCDMA, CDMA2000, or GPRS, among others.Such communication may occur, for example, through radio-frequencytransceiver 668. In addition, short-range communication may occur, suchas using a Bluetooth, WiFi, or other such transceiver (not shown). Inaddition, GPS (Global Positioning System) receiver module 670 mayprovide additional navigation- and location-related wireless data todevice 650, which may be used as appropriate by applications running ondevice 650.

Device 650 may also communicate audibly using audio codec 660, which mayreceive spoken information from a user and convert it to usable digitalinformation. Audio codec 660 may likewise generate audible sound for auser, such as through a speaker, e.g., in a handset of device 650. Suchsound may include sound from voice telephone calls, may include recordedsound (e.g., voice messages, music files, etc.) and may also includesound generated by applications operating on device 650.

The computing device 650 may be implemented in a number of differentforms, as shown in the figure. For example, it may be implemented as acellular telephone 680. It may also be implemented as part of asmartphone 682, personal digital assistant, or other similar mobiledevice.

Various implementations of the systems and techniques described here canbe realized in digital electronic circuitry, integrated circuitry,specially designed ASICs (application specific integrated circuits),computer hardware, firmware, software, and/or combinations thereof.These various implementations can include implementation in one or morecomputer programs that are executable and/or interpretable on aprogrammable system including at least one programmable processor, whichmay be special or general purpose, coupled to receive data andinstructions from, and to transmit data and instructions to, a storagesystem, at least one input device, and at least one output device.

These computer programs (also known as programs, software, softwareapplications or code) include machine instructions for a programmableprocessor, and can be implemented in a high-level procedural and/orobject-oriented programming language, and/or in assembly/machinelanguage. As used herein, the terms “machine-readable medium”“computer-readable medium” refers to any computer program product,apparatus and/or device (e.g., magnetic discs, optical disks, memory,Programmable Logic Devices (PLDs)) used to provide machine instructionsand/or data to a programmable processor, including a machine-readablemedium that receives machine instructions as a machine-readable signal.The term “machine-readable signal” refers to any signal used to providemachine instructions and/or data to a programmable processor.

To provide for interaction with a user, the systems and techniquesdescribed here can be implemented on a computer having a display device(e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor)for displaying information to the user and a keyboard and a pointingdevice (e.g., a mouse or a trackball) by which the user can provideinput to the computer. Other kinds of devices can be used to provide forinteraction with a user as well; for example, feedback provided to theuser can be any form of sensory feedback (e.g., visual feedback,auditory feedback, or tactile feedback); and input from the user can bereceived in any form, including acoustic, speech, or tactile input.

The systems and techniques described here can be implemented in acomputing system that includes a back end component (e.g., as a dataserver), or that includes a middleware component (e.g., an applicationserver), or that includes a front end component (e.g., a client computerhaving a graphical user interface or a Web browser through which a usercan interact with an implementation of the systems and techniquesdescribed here), or any combination of such back end, middleware, orfront end components. The components of the system can be interconnectedby any form or medium of digital data communication (e.g., acommunication network). Examples of communication networks include alocal area network (“LAN”), a wide area network (“WAN”), and theInternet.

The computing system can include clients and servers. A client andserver are generally remote from each other and typically interactthrough a communication network. The relationship of client and serverarises by virtue of computer programs running on the respectivecomputers and having a client-server relationship to each other.

A number of embodiments have been described. Nevertheless, it will beunderstood that various modifications may be made without departing fromthe spirit and scope of the invention. For example, much of thisdocument has been described with respect to word processing documentsbut other forms of documents may also be addressed.

In addition, the logic flows depicted in the figures do not require theparticular order shown, or sequential order, to achieve desirableresults. In addition, other steps may be provided, or steps may beeliminated, from the described flows, and other components may be addedto, or removed from, the described systems. Accordingly, otherembodiments are within the scope of the following claims.

1-22. (canceled)
 23. A computer-implemented collaborative editingmethod, comprising: receiving a first change from a first user to adocument displayed by a first browser-based document editingapplication, wherein the document is stored by a computing device;identifying a first current location in the document for a cursorassociated with the first user; receiving a second change made to thedocument by a second user other than the first user and a second currentposition in the document of a cursor associated with the second user;determining that the received first change from the first user and thereceived second change by the second user include conflicting edits to asame portion of the document; and modifying the document based on aconflict resolving rule, wherein: the first browser-based documentediting application renders a first portion of the modified document andthe second browser-based document editing application renders a secondportion of the modified document, a first indicator of the secondcurrent position of the cursor associated with the second user isdisplayed along with a first identity tag identifying the second userwithin the first portion, and a second indicator of the first currentlocation of the cursor associated with the first user is displayed alongwith a second identity tag identifying the first user within the secondportion.
 24. The computer-implemented method of claim 23, wherein thefirst user maintains a first client copy of the document, and the seconduser maintains a second client copy of the document.
 25. Thecomputer-implemented method of claim 24, wherein the first change ismade by the first user within the first client copy, and the secondchange is made by the second user within the second client copy.
 26. Thecomputer-implemented method of claim 23, further comprising: storing, ata server, a master copy of the document to perform collaborative editingduring a common session; and synchronizing the master copy of thedocument with the first client copy and the second client copy.
 27. Thecomputer-implemented method of claim 23, wherein the conflict resolvingrule includes a rule that adopts edits to the mater copy of the documentbased on an arrival time of the edits at the server.
 28. Thecomputer-implemented method of claim 23, wherein the conflict resolvingrules includes a rule that adopts edits to the mater copy of thedocument based on a user status associated with the edits.
 29. Thecomputer-implemented method of claim 23, further comprising:transmitting information indicative of modifications made to the mastercopy of the document model and information indicative of the locationsin the electronic document of cursors to the first user or the seconduser.
 30. A system for collaborative editing, comprising: a memory; anda computer processor communicatively coupled to the memory, the computerprocessor configured to: receive a first change from a first user to adocument displayed by a first browser-based document editingapplication, wherein the document is stored by a computing device;identify a first current location in the document for a cursorassociated with the first user; receive a second change made to thedocument by a second user other than the first user and a second currentposition in the document of a cursor associated with the second user;determine that the received first change from the first user and thereceived second change by the second user include conflicting edits to asame portion of the document; and modify the document based on aconflict resolving rule, wherein: the first browser-based documentediting application renders a first portion of the modified document andthe second browser-based document editing application renders a secondportion of the modified document, a first indicator of the secondcurrent position of the cursor associated with the second user isdisplayed along with a first identity tag identifying the second userwithin the first portion, and a second indicator of the first currentlocation of the cursor associated with the first user is displayed alongwith a second identity tag identifying the first user within the secondportion.
 31. The system of claim 30, wherein the first user maintains afirst client copy of the document, and the second user maintains asecond client copy of the document.
 32. The system of claim 30, whereinthe first change is made by the first user within the first client copy,and the second change is made by the second user within the secondclient copy.
 33. The system of claim 30, wherein the processor isfurther configured to: store, at a server, a master copy of the documentto perform collaborative editing during a common session; andsynchronizing the master copy of the document with the first client copyand the second client copy.
 34. The system of claim 30, wherein theconflict resolving rule includes a rule that adopts edits to the matercopy of the document based on an arrival time of the edits at theserver.
 35. The system of claim 30, wherein the conflict resolving rulesincludes a rule that adopts edits to the mater copy of the documentbased on a user status associated with the edits.
 36. The system ofclaim 30, wherein the processor is further configured to: transmitinformation indicative of modifications made to the master copy of thedocument model and information indicative of the locations in theelectronic document of cursors to the first user or the second user. 37.A computer-readable non-transitory storage medium storing a plurality ofprocessor-executable instructions, the processor-executable instructionsexecuted by a computer processor to: receive a first change from a firstuser to a document displayed by a first browser-based document editingapplication, wherein the document is stored by a computing device;identify a first current location in the document for a cursorassociated with the first user; receive a second change made to thedocument by a second user other than the first user and a second currentposition in the document of a cursor associated with the second user;determine that the received first change from the first user and thereceived second change by the second user include conflicting edits to asame portion of the document; and modify the document based on aconflict resolving rule, wherein: the first browser-based documentediting application renders a first portion of the modified document andthe second browser-based document editing application renders a secondportion of the modified document, a first indicator of the secondcurrent position of the cursor associated with the second user isdisplayed along with a first identity tag identifying the second userwithin the first portion, and a second indicator of the first currentlocation of the cursor associated with the first user is displayed alongwith a second identity tag identifying the first user within the secondportion.
 38. The medium of claim 37, wherein the first user maintains afirst client copy of the document, and the second user maintains asecond client copy of the document.
 39. The medium of claim 37, whereinthe first change is made by the first user within the first client copy,and the second change is made by the second user within the secondclient copy.
 40. The medium of claim 37, wherein theprocessor-executable instructions further comprise instructions executedby the processor to: store, at a server, a master copy of the documentto perform collaborative editing during a common session; andsynchronizing the master copy of the document with the first client copyand the second client copy.
 41. The medium of claim 37, wherein theconflict resolving rule includes a rule that adopts edits to the matercopy of the document based on an arrival time of the edits at theserver.
 42. The medium of claim 37, wherein the conflict resolving rulesincludes a rule that adopts edits to the mater copy of the documentbased on a user status associated with the edits.